<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class m_home extends CI_Model {

	public function __construct()
	{
		parent::__construct();
		
	}

	public function home()
	{
		$this->db->select('*');
		$this->db->where('is_active', 0);
		$query = $this->db->get('slider');
		return $query->result();
	}

	public function gallery()
	{
		$this->db->select('*');
		$this->db->where('g_state', 1);
		$query = $this->db->get('gallery');
		return $query->result();
	}

	public function id_facilities($id=null)
	{
		$this->db->select('*');
		$this->db->where('id_facilities', $id);
		$this->db->where('f_state', 1);
		$query = $this->db->get('facilities');
		return $query->row();
	}
	public function facilities()
	{
		$this->db->select('*');
		$this->db->where('f_state', 1);
		$query = $this->db->get('facilities');
		return $query->result();
	}

	public function add($data=null)
	{
		return $this->db->insert('guest', $data);
	}

	public function tamu()
	{
		$query = $this->db->get('guest');
		 return $query->result();
	}


}

/* End of file m_home.php */
/* Location: ./application/models/m_home.php */